package com.beidouapp.dao;

import java.util.List;
import java.util.Map;

import com.beidouapp.domain.example.EmployeeExample;
import com.beidouapp.domain.pojo.Employee;
import com.beidouapp.domain.pojo.User;
import com.beidouapp.domain.vo.OrgRoleEmployeeVO;
import org.apache.ibatis.annotations.Param;

public interface EmployeeDao extends BaseDao<Employee> {

    public Employee getEmployeeByUserId(Long userId);

    /**
     * 查询指定角色下所有的员工.
     * @param roleId
     * @return
     */
    public List<Employee> findEmployeeListByRoleId(Long roleId);

    /**
     * 查询员工列表
     *
     * @param params
     * @return
     */
    public List<OrgRoleEmployeeVO> findOrgRoleEmployeesByMap(Map<String, Object> params, Integer offset, Integer limit);

    public Integer findCountOrgRoleEmployees(Map<String, Object> params);

    public OrgRoleEmployeeVO getEmployeeVOById(Long empId);


    //-------------------
    public int insert(Employee record);

    public int updateByPrimaryKeySelective(Employee record);

    /**
     * 根据条件查询员工信息
     *
     * @param example
     * @return
     */
    public Employee selectOneByExample(EmployeeExample example);

    public Employee getEmployeeById(Long id);

    /**
     * 根据条件查询员工信息（分页）
     *
     * @param example
     * @return
     */
    public List<Employee> selectPageByExample(EmployeeExample example);


}
